home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / utilities / u620.dms / in.adf / Tips&Tricks / Anropa Asm från C / Exempel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-27  |  342 b   |  23 lines

  1.  
  2. #include <stdio.h>
  3.  
  4.  
  5. extern long add3(long first, long second, long third);
  6.  
  7. int main(void)
  8. {
  9.  long tal[3];
  10.  int i = 0;
  11.  
  12.  while(i < 3) {
  13.     printf("Mata in heltal %d: ",i+1);
  14.       if(1 != scanf("%ld",&tal[i]))
  15.        printf("Ett heltal sade jag...Gör om!\n");
  16.     else
  17.        i++;
  18.  }
  19.  
  20.  printf("Summan är %ld!\n",add3(tal[0],tal[1],tal[2]));
  21.  return 0;
  22. }
  23.